package com.quanyue.music.template.mapper;

import com.quanyue.music.domain.entity.FormId;
import com.shzisg.mybatis.mapper.auto.AutoMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.time.LocalDate;
import java.util.List;

@Mapper
public interface TemplateMapper extends AutoMapper <FormId> {
    List <FormId> findByUserId(@Param("userId") String userId);

    @Select("select id from qy_form_id where user_id = #{userId} and DATE_FORMAT(create_time, '%Y-%m-%d') = #{date}")
    List <String> findByUserIdAndDate(@Param("userId") String userId, @Param("date") LocalDate localDate);
}
